<?

/* DefaultModel model class.
 * This class contains data model implementation code.
 */ 
/* @author Udo Schroeter <udo.schroeter@gmail.com>
 * @license dual license: LGPL / commercial use license
 */ 

class DefaultModel extends AGModel
{
  // model data
  var $data;

  function __construct($modelName) 
  {
    parent::__construct($modelName);
    // your constructor code goes here
    
  }

  function getOpenInvitations(&$userObject)
  {
    return(DB_GetList('SELECT * FROM '.getTableName('users').'
      LEFT JOIN '.getTableName('invited_people').' ON (ip_inviter=u_key 
        AND ip_invited_fb_uid="'.$userObject->localRecord['u_fb_uid'].'")
      WHERE ip_status="A"
      GROUP BY ip_inviter
      ORDER BY ip_key DESC
      '));
  }

}


?>
